package Thread;
//1.创建子类继承Thread，重写run
class MyThread extends Thread{
    @Override
    public void run() {
        System.out.println("MyThread线程运行");
    }
}
public class Demo1 {
    public static void main(String[] args) {
        MyThread t=new MyThread();
        t.start();
        System.out.println("Main线程运行");
    }

}
